package cn.tedu.mvc;

import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;
/**MVC 设计模式里的Controller
 * @author zhuzhuking*/
@RestController
@RequestMapping("car")
public class HelloController {
    @RequestMapping("show")
    public String show(){
        return "123" ;
    }
    @RequestMapping("get")
    public Object get(){
        return new car(1,"porche","911 carrera","red",150000.0);
//        c.setColor("red");
//        c.setId(10001);
//        c.setName("preche");
//        c.setPrice(10000.0);
//        c.setType("911 Carrera");
        //把对象信息转换为JSON字符串在浏览器展示
    }
}
